pkgname=postmarketos-mkinitfs
pkgver=0.6.0
pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://github.com/postmarketOS"
# multipath-tools: kpartx
depends="busybox-extras lddtree cryptsetup kmod multipath-tools postmarketos-splash device-mapper parted e2fsprogs e2fsprogs-extra osk-sdl"
triggers="$pkgname.trigger=/etc/postmarketos-mkinitfs/hooks:/usr/share/kernel/*"
source="init.sh.in init_functions.sh mkinitfs.sh"
arch="noarch"
license="GPL2"
provides="mkinitfs=0.0.1"
options="!check"

package() {
	mkdir -p "$pkgdir/usr/share/postmarketos-mkinitfs/"
	for file in init.sh.in init_functions.sh; do
		install -Dm644 "$srcdir/$file" \
			"$pkgdir/usr/share/postmarketos-mkinitfs/$file"
	done
	install -Dm755 "$srcdir/mkinitfs.sh" \
		"$pkgdir/sbin/mkinitfs"
	mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/"
}
sha512sums="500c1e903ca9cf5dfe0102414b086643379d51d848e15eeed89da8ba9f3a286dfba139a29b8312a0df005e159a54ad08c84e078b7d70e6873cabb7d0abda4807  init.sh.in
eca1e4647494556be52b3eecffe2db75735006a6c53e8778630949808aabc464281ffa75a8744e22a5512c2de1eb5f92f9eb377a55ca4a7402ba8cc0705df83d  init_functions.sh
72bbb1515a8ff0236db25f0069fd99549e3dda1836e7e963771f274486a33f7f33137c97d7a67246c80fb146c99739860ee3771981f16d826716b2ce424c1364  mkinitfs.sh"
